{* Smarty *}
{extends file='include/base_with_menu.tpl'}

{block name='content'}
<form id="log_form">
<div class="layout">
<table class="tbData01" width="100%" cellspacing="0" cellpadding="0">
    <tr>
        <th style="width:auto;">工号</th>
        <th style="width:auto;">用户名</th>
        <th style="width:auto;">姓名</th>
        <th style="width:auto;">访问IP地址</th>
        <th style="width:auto;">登入时间</th>
        <th style="width:auto;">登出时间</th>
        <th style="width:auto;">登录时长</th>
        <th style="width:auto;">是否有操作</th>
    </tr>
    {foreach $list as $item}
    <tr {if $item@index is odd}class="even"{/if}>
        <td>{$item.user_id}</td>
        <td>{$item.username|escape}</td>
        <td>{$item.name|escape}</td>
        <td>{$item.ip_address|escape}</td>
        <td>{$item.login_time|date_format:"%Y-%m-%d %H:%M:%S"}</td>
        <td>{$item.logout_time|date_format:"%Y-%m-%d %H:%M:%S"}</td>
        <td>{date_sub from=$item.login_time to=$item.logout_time format='%H小时%i分%s秒'}</td>
        <td>{if $item.is_has_operate > 0}有{else}无{/if}</td>
    </tr>
    {/foreach}
</table>
</div>
{include file='include/page.tpl'} 
{call name=pagination form_id="log_form" page=$pagination.page total=$pagination.total}
</form>
{/block}
